package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.GoodsPackageDetailMapper;
import com.ruoyi.domain.GoodsPackageDetail;
import com.ruoyi.service.IGoodsPackageDetailService;

/**
 * 促销套餐明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-13
 */
@Service
public class GoodsPackageDetailServiceImpl implements IGoodsPackageDetailService 
{
    @Autowired
    private GoodsPackageDetailMapper goodsPackageDetailMapper;

    /**
     * 查询促销套餐明细
     * 
     * @param packageDetailId 促销套餐明细主键
     * @return 促销套餐明细
     */
    @Override
    public GoodsPackageDetail selectGoodsPackageDetailByPackageDetailId(Long packageDetailId)
    {
        return goodsPackageDetailMapper.selectGoodsPackageDetailByPackageDetailId(packageDetailId);
    }

    /**
     * 查询促销套餐明细列表
     * 
     * @param goodsPackageDetail 促销套餐明细
     * @return 促销套餐明细
     */
    @Override
    public List<GoodsPackageDetail> selectGoodsPackageDetailList(GoodsPackageDetail goodsPackageDetail)
    {
        return goodsPackageDetailMapper.selectGoodsPackageDetailList(goodsPackageDetail);
    }

    /**
     * 新增促销套餐明细
     * 
     * @param goodsPackageDetail 促销套餐明细
     * @return 结果
     */
    @Override
    public int insertGoodsPackageDetail(GoodsPackageDetail goodsPackageDetail)
    {
        return goodsPackageDetailMapper.insertGoodsPackageDetail(goodsPackageDetail);
    }

    /**
     * 修改促销套餐明细
     * 
     * @param goodsPackageDetail 促销套餐明细
     * @return 结果
     */
    @Override
    public int updateGoodsPackageDetail(GoodsPackageDetail goodsPackageDetail)
    {
        return goodsPackageDetailMapper.updateGoodsPackageDetail(goodsPackageDetail);
    }

    /**
     * 批量删除促销套餐明细
     * 
     * @param packageDetailIds 需要删除的促销套餐明细主键
     * @return 结果
     */
    @Override
    public int deleteGoodsPackageDetailByPackageDetailIds(Long[] packageDetailIds)
    {
        return goodsPackageDetailMapper.deleteGoodsPackageDetailByPackageDetailIds(packageDetailIds);
    }

    /**
     * 删除促销套餐明细信息
     * 
     * @param packageDetailId 促销套餐明细主键
     * @return 结果
     */
    @Override
    public int deleteGoodsPackageDetailByPackageDetailId(Long packageDetailId)
    {
        return goodsPackageDetailMapper.deleteGoodsPackageDetailByPackageDetailId(packageDetailId);
    }
}
